//登录令牌
const HMTT_TOKEN = 'hmtt_token'
export const setToken = (token)=>localStorage.setItem(HMTT_TOKEN,token)
export const getToken = ()=> localStorage.getItem(HMTT_TOKEN)
export const removeToken = ()=>localStorage.removeItem(HMTT_TOKEN)

//用户ID
const HMTT_ID = 'hmtt_id'
export const setID = (id)=>localStorage.setItem(HMTT_ID,id)
export const getID = ()=> localStorage.getItem(HMTT_ID)
export const removeID = ()=>localStorage.removeItem(HMTT_ID)


//关注的栏目
const followListCate = 'hmtt_followListCate'
export const setCate = (List)=>localStorage.setItem(followListCate,JSON.stringify(List))
export const getCate = ()=> JSON.parse(localStorage.getItem(followListCate))  || []
export const removeCate = ()=>localStorage.removeItem(followListCate)

//未关注的栏目
const unListCate = 'hmtt_unListCate'
export const setunCate = (List)=>localStorage.setItem(unListCate,JSON.stringify(List))
export const getunCate = ()=> JSON.parse(localStorage.getItem(unListCate))  || []
export const removeunCate = ()=>localStorage.removeItem(unListCate)

//历史记录
const HistorySearch = 'hmtt_historysearch'
export const setHistorySearch = (List)=>localStorage.setItem(HistorySearch,JSON.stringify(List))
export const getHistorySearch = ()=> JSON.parse(localStorage.getItem(HistorySearch))  || []
export const removeunHistorySearch = ()=>localStorage.removeItem(HistorySearch)
